All Questions
Tagged with lazy-initializationdesign
3 questions
2votes
1answer
118views
Modelling seats of a table in a social game
Assume we want to model a table where players can sit down to get together to play a game (card games, dice games, ...). Assume a few properties associated with each seat class Seat { public int ...
0votes
2answers
924views
Is there a better way to use Lazy<T> than what I'm doing?
I recently started trying to use the Lazy class to implement lazy loading. However, I'm finding that doing so does not seem to have any advantages over simply implementing it myself via a null-...
4votes
1answer
467views
Is it ever appropriate to lazy load properties?
Consider the following contrived program: class Program { static void Main(string[] args) { var myClass = new MyClass(); var stuff = myClass.MyProperty; // this takes 5 ...